package servlet;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/navigation")
public class NavigationServlet extends HttpServlet {

    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        // 设置响应内容类型
        response.setContentType("text/html;charset=UTF-8");

        // 获取 PrintWriter 对象
        PrintWriter out = response.getWriter();

        // 输出导航链接
        out.println("<ul class=\"layui-nav layui-layout-left\">");
        out.println("<li class=\"layui-nav-item\"><a href=\"/personalInfoServlet\">个人信息</a></li>");
        out.println("<li class=\"layui-nav-item\"><a href=\"/newsServlet\">新闻发布信息</a></li>");
        out.println("</ul>");
    }
}
